home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / www / amitrix / as.lha / Install-Auto_Search next >
Text File  |  1998-04-18  |  3KB  |  107 lines

  1. ; $VER: Install autosearch 1.2 18.04.98
  2. ; 18 Apr 1998 WHMP
  3. ; Description: Installer script for AWeb-II 3.x extras
  4.  
  5. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  6. (set awv 3)
  7. (set awr 1)
  8. (set #needInst43 "You must use Installer version 43 or greater.  Use the Installer program from your AWeb-II disk.")
  9. (if (< (/ @installer-version 65536) 43)
  10.   (abort #needInst43)
  11. )
  12.  
  13. (set #installing "Installing ")
  14. ; offer to back up a file or drawer
  15. (procedure bumprev #bumpfile #bumptxt
  16.   (if (exists #bumpfile)
  17.     (
  18.       (set bump 1)
  19.       (while (exists (cat #bumpfile "_old" bump) ) (set bump (+ bump 1)) )
  20.       (if
  21.         (askbool
  22.           (default 1)
  23.           (prompt (cat "\n\n\nBackup " #bumpfile " as "
  24.               #bumpfile "_old" bump " ?\n\n\n "
  25.           #bumptxt ) )
  26.           (help
  27.             (cat "\n\n\n\"" #bumpfile "\" is about to be over written.\n"
  28.               "\nYou are being given the chance to back it up."
  29.               " If you are unsure select yes... just in case ;-D ."
  30.             )
  31.           )
  32.         )
  33.         ;        (rename #bumpfile (cat #bumpfile "_old" bump))
  34.         ( (set bdest (cat #bumpfile "_old" bump))
  35.           (copyfiles
  36.             (source #bumpfile)
  37.             (dest bdest)
  38.             (all)
  39.           )
  40.         )
  41.       )
  42.     )
  43.   )
  44. )
  45.  
  46. ;add a line to a settings file
  47.  
  48. (procedure addpref #preffile #preftext
  49.   (foreach "ENVARC:AWeb3" "~(program|browser|gui|network|window|settings)"
  50.     (
  51.       (if (= @each-type 2)
  52.         (run (cat "echo >>ENVARC:AWeb3/" @each-name "/" #preffile " \"" #preftext  "\"") )
  53.       )
  54.     )
  55.   )
  56.   (run (cat "echo >>ENVARC:AWeb3/" #preffile " \"" #preftext  "\"") )
  57. )
  58.  
  59. (set #no-aweb-ii
  60.   (cat "You must have completed the AWeb-II 3.1 installation before "
  61.     "you can install the %s plug-in. No AWeb3: assign has been found."
  62.   )
  63. )
  64. (if (not (exists "AWeb3:" (noreq)))
  65.   (abort (#no-aweb-ii "Utilities"))
  66. )
  67.  
  68. (set @default-dest "AWeb3:")
  69. (bumprev "envarc:aweb3"
  70.   (cat "Your previously SAVED AWeb 3.1 configuration"
  71.   " is in this directory.")
  72. ) ; backup any previous AWeb3 prefs
  73.  
  74. (addpref "network" "ASRH 1")
  75.         (addpref "network" "SRCH x-aweb:rexx/awebpath:plugins/autosearch/autosearch.awebrx %s")
  76.         (copyfiles
  77.           (source "autosearch")
  78.           (dest "AWeb3:Plugins/autosearch")
  79.           (prompt #installing #aweb-as)
  80.           (all)
  81. )
  82. (if (= @user-level 2)
  83.   ( bumprev "env:aweb3"
  84.     (cat "Your previous ACTIVE AWeb 3.1 configuration"
  85.     " is in this directory.")
  86.   ) ;backup any active prefs
  87. )
  88.  
  89. (delete "env:aweb3/#?" (all))
  90.  
  91. (copyfiles
  92.   (source "ENVARC:AWeb3")
  93.   (dest "ENV:AWeb3")
  94.   (all)
  95. )
  96.  
  97.  
  98. (complete 100)
  99. (set @default-dest "AWeb3:plugins")
  100.  
  101.  
  102. (exit  "\n\n" @app-name
  103.   " is now installed.\n\n"
  104.   "If this is an update instalation be sure to check your GUI and/or ARexx menu"
  105. " settings for duplicate entries.")
  106.  
  107.